<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/bootstrap/dist/css/bootstrap.min.css">
    <script src="/js/jquery-3.3.1.min.js"></script>
    <script src="/bootstrap/dist/js/bootstrap.min.js"></script>
    <title>modal</title>
</head>
<body>
    <div style="height:30px;"></div>
    <div class="container">
        <div class="row">
            <div class="">
                <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#myModal">
                    Modal
                </button>
            </div>
            <!-- modal -->
            <div class="modal fade" id="myModal" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <!-- 头部 -->
                        <div class="modal-header">
                            头部
                            <button class="btn btn-danger btn-sm" data-dismiss="modal">
                                x
                            </button>
                        </div>
                        <!-- 内容区域 -->
                        <div class="modal-body">
                            这是内容
                        </div>
                        <!-- 尾部 -->
                        <div class="modal-footer">
                            <button class="btn btn-primary btn-sm">
                                save
                            </button>
                            <button class="btn btn-danger btn-sm" data-dismiss="modal">
                                close
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>